package models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import play.db.ebean.Model;

@Entity
@Table(name = "usergroup")
public class UserGroup extends Model
{
    private static final long serialVersionUID = 1L;

    @Id
    protected String id;
    protected String title;
    @Column(columnDefinition="LONGTEXT")
    protected String description;
    
    protected static String ID 		= "id";
    protected static String TITLE 		= "title";
    protected static String DESCRIPTION 	= "description";
    
    public static Model.Finder<Long, UserGroup> find = new Model.Finder<Long, UserGroup>(
	    Long.class, UserGroup.class);

    public static UserGroup getUserGroupById(Long id)
    {
	return UserGroup.find.byId(id);
    }
    
    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getDescription()
    {
        return description;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }
}
